<!doctype html>
<html lang="en">
	<head>
		<?php echo $this->Html->charset(); ?>
		<title>
			<?php echo $title_for_layout; ?>
		</title>
		<?php
			echo $this->Html->meta('icon');
			echo $this->Html->css('screen.css');
			echo $this->Html->script('head');
			
			echo $this->fetch('meta');
			echo $this->fetch('css');
			echo $this->fetch('script');
		?>
		
	</head>
	<body>
		<div id="root">
			
			<header id="top">
				<h1><a href="/it_center/Pages/display" accesskey="h"><?php echo $center_info[0]['CenterInformation']['m_cif_name'];?></a></h1>
				<?php If (!isset($admin) ){?>
			
				
				<nav id="nav">
					<ul class="primary">
						<li><a accesskey="1" href="/it_center/Pages/display">Trang chủ</a><em>(1)</em></li>
						<li><a accesskey="2">Khóa học</a><em>(2)</em>
							<?php if (count($courses)){?>
							<ul>
								<?php foreach ($courses as $course): ?>
									<li>
										<a href="/it_center/Courses/details?id=<?php echo $course['Course']['m_course_id'];?>">
											<?php echo $course['Course']['m_course_name'];?>
										</a>
									</li>
								<?php endforeach; ?>
							</ul>
							<?php }?>
						</li>
						<li><a accesskey="3" href="/it_center/Subjects/listSubject">Môn học</a> <em>(3)</em>
							<?php if (count($subjects)){?>
							<ul>
								<?php foreach ($subjects as $subject): ?>
									<li>
										<a href="/it_center/Subjects/detailSubject?sub_id=<?php echo $subject['Subject']['sub_id'];?>">
											<?php echo $subject['Subject']['sub_name'];?>
										</a>
									</li>
								<?php endforeach; ?>
							</ul>
							<?php }?>
						</li>
						<li><a accesskey="4" href="/it_center/Faculties/listFaculties">Giảng viên</a> <em>(4)</em>
						</li>
						<li><a accesskey="5" href="/it_center/Libs">Thư viện</a> <em>(5)</em></li>
						<li><a accesskey="6" href="/it_center/Videos">Video</a> <em>(6)</em></li>
						<li><a accesskey="7" href="/it_center/CenterInformations">Liên hệ</a> <em>(7)</em></li>
					</ul>
					
				</nav>
				<?php }else{ ?>
				
				<?php if (isset($_SESSION['user_id'])){?>
				<nav id="nav">
					<ul class="primary">
						<li><a accesskey="1" href="/it_center/Courses/manageListCourses">Khóa học</a> <em>(1)</em></li>
						<li><a accesskey="2" href="/it_center/Subjects/manageListSubject">Môn học</a> <em>(2)</em></li>
						<li><a accesskey="3" href="/it_center/Schedules/index">Lịch học</a> <em>(3)</em></li>
						<li><a accesskey="4" href="/it_center/Faculties/index">Giảng viên</a> <em>(4)</em></li>
						<li><a accesskey="5" href="/it_center/Videos/manageListVideos">Video</a> <em>(5)</em></li>
						<li><a accesskey="6" href="/it_center/Libs/list_lib">Thư viện</a> <em>(6)</em></li>
						
						<li><a accesskey="7">Hiển thị</a> <em>(7)</em>
							<ul>
								<li>
									<a href="/it_center/MainInformations">Trang chủ</a>									
								</li>
								<li>
									<a href="/it_center/Pics">Hình ảnh</a>
								</li>
							</ul>
						</li>
						<li><a accesskey="8" href="/it_center/CenterInformations/edit">Liên hệ</a> <em>(8)</em></li>
					</ul>
					
				</nav>
				<nav id="nav">
					<ul class="secondary">       
						<li><a href="/it_center/Users/userHome">Trang chủ</a></li>                             
						<li><a href="/it_center/Users/logout">Đăng xuất</a></li>
						<li><a href="/it_center/Users/change_password">Đổi mật khẩu</a></li>
					</ul>
				</nav>
				<?php }?>
				<?php }?>
			</header>  
			<?php echo $this->Session->flash(); ?>
			<?php echo $this->fetch('content'); ?> 
			<footer id="footer">
				<nav>
					
					<div class="vcard">
						<h3 class="fn org">
							<?php echo $center_info[0]['CenterInformation']['m_cif_name'];?>
						</h3>
						<p class="adr">
							<span class="street-address">
							<?php echo $center_info[0]['CenterInformation']['m_cif_address'];?>
							</span>
						</p>
						<p class="adr">
							<span class="street-address">
							<?php echo $center_info[0]['CenterInformation']['m_cif_tel'];?>
							</span>
						</p>
						<p class="adr">
							<span class="street-address">
							<?php echo $center_info[0]['CenterInformation']['m_cif_mobile'];?>
							</span>
						</p>
						<p class="adr">
							<span class="street-address">
							<?php echo $center_info[0]['CenterInformation']['m_cif_email'];?>
							</span>
						</p>
						
					
					</div>
				</nav>
				<p>Copyright <span class="date">2013</span> &copy; <a href="default.htm">Medical Centre, Inc.</a> All Rights Reserved.</p>
			</footer>
		</div>
		<script type="text/javascript">
			head.js('http://ajax.googleapis.com/ajax/libs/jquery/1.9.0/jquery.min.js','/it_center/javascript/scripts.js','/it_center/javascript/mobile.js')
		</script>
	</body>
</html>